Skip to content

ENG-1405 Fix restore testing plan name: replace hyphens with underscores and remove tautological suffix - #48

Merged
terado merged 1 commit into
mainfrom
bug/dh-tautology
Aug 10, 2026
Merged

ENG-1405 Fix restore testing plan name: replace hyphens with underscores and remove tautological suffix#48
terado merged 1 commit into
mainfrom
bug/dh-tautology

Conversation

@davidhallam4-nhs

@davidhallam4-nhs davidhallam4-nhs commented Jun 3, 2025

Copy link
Copy Markdown
Contributor

Description

Fixes the restore_testing_plan_name in the source module to comply with the AWS Backup API constraint that only allows alphanumeric characters and underscores. Replaces hyphens in local.resource_name_prefix with underscores via replace(), and removes the redundant _backup_restore_testing_plan suffix that consumed 28 of the 50-character limit without adding value.

Context

The AWS RestoreTestingPlanName field must consist of only alphanumeric characters and underscores (max 50 chars). The previous implementation either appended a tautological suffix (_backup_restore_testing_plan) or fell back to a hardcoded name, and did not handle hyphens that naturally appear in resource_name_prefix (e.g. from region names like eu-west-2). This caused failures for environments with longer prefixes (e.g. mesh) where the 50-char limit was exceeded.

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@davidhallam4-nhs
davidhallam4-nhs requested a review from a team as a code owner June 3, 2025 20:43
@regularfry regularfry added bugfix Fix for a bug breaking A change that alters the API or behaviour in a breaking way labels Jul 9, 2025
@terado terado added the ticketed label Aug 7, 2026
@terado terado changed the title Translation of - to _ and removal of the tautological _backup_restore_testing_plan suffix ENG-1405 Fix restore testing plan name: replace hyphens with underscores and remove tautological suffix Aug 10, 2026
@terado
terado merged commit 37dc1e3 into main Aug 10, 2026
1 check passed
@terado
terado deleted the bug/dh-tautology branch August 10, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking A change that alters the API or behaviour in a breaking way bugfix Fix for a bug ticketed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants